const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,

  devServer:{
    proxy: {
        // 所有包含有'api'字符串的请求地址都会转发到target指向的地址
        "/api": {
          target: "http://172.16.14.41:8080/",
          ws: true,
          // 允许跨域
          changeOrigin: true,
          pathRewrite: {
            "^/api": "", //通过pathRewrite重写地址，将前缀/api转为/
          },
        },
      },
},

  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      patterns: []
    }
  }
})
